package com.ruoyi.pay.controller;

import com.baomidou.mybatisplus.extension.api.R;
import com.ruoyi.pay.config.PayConfig;
import com.ruoyi.pay.entity.PayEntity;
import com.ruoyi.pay.service.ZFBPayService;
import com.ruoyi.pay.vo.PayVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @author yqq
 * @date 2023/10/10
 * @Description
 */
@RestController
@RequestMapping("/protal/pay")
public class ZFBPayController {

    @Autowired
    private ZFBPayService zfbPayService;


    /**
     * 服务端统一下单参数
     * @return
     */
    @PostMapping("/splicingParameter")
    public R<PayEntity> splicingParameter(@RequestBody PayVO entity, HttpServletRequest request){
        return zfbPayService.splicingParameter(entity,request);
    }
}
